﻿/***********************************************************************************************
 * 
 * ProjectName: WMSSoft.Lib.WinKStart
 * 
 * Description: Class to configure reading style to object
 * 
 * Created:     22.08.2014
 * 
 * Author:      matthias wagler - matthias@WMSSoft.de
 * 
 * Copyright:   Copyright 2014 by WMSSoft.net
 * 
 * License:     GPLv3
 * 
 * History:     22.08.2014 - matthias wagler matthias@WMSSoft.de   -   Created
 * 
 **********************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;

namespace WMSSoft.Lib.WinKStart.Classes.Styles
{
    /// <summary>
    /// The Class Contains a Configuration - Object to describe a Style for a label, textbox. 
    /// The Class is the Base for the cUIElementRegion
    /// </summary>
    public class cUIElement
    {
        private cUIBorderStyle _Border = new cUIBorderStyle();
        private System.Windows.Thickness _Padding = new System.Windows.Thickness();
        private System.Windows.Thickness _Margin = new System.Windows.Thickness();
        private Color _BackgroundColor = Color.FromRgb(255, 255, 255);
        private Color _FontColor = Color.FromRgb(0, 0, 0);
        private string _FontFamily = "Arial";
        private double _FontSize = 12.0;
        private double _Height = -1;
        private double _Width = -1;
        private FontStyle _FontStyle = FontStyles.Normal;
        private FontWeight _FontWeight = FontWeights.Normal;
        private Visibility _Visible = Visibility.Visible;
        private Enums.eXMLHorizontalAlign _HorizontalAlign = Enums.eXMLHorizontalAlign.Left;
        private Enums.eXMLVerticalAlign _VerticalAlign = Enums.eXMLVerticalAlign.Center;

        public cUIElement()
        {
            //TODO: implements code to initialise
        }

        public cUIElement(Color BackgroundColor, string FontFamily, double FontSize, Color FontColor, 
                          FontStyle FontStyle, FontWeight FontWeight, Enums.eXMLHorizontalAlign HorizontalAlign,
                          Enums.eXMLVerticalAlign VerticalAlign, Visibility Visible)
        {
            _BackgroundColor = BackgroundColor;
            _FontFamily = FontFamily;
            _FontSize = FontSize;
            _FontColor = FontColor;
            _FontStyle = FontStyle;
            _FontWeight = FontWeight;
            _HorizontalAlign = HorizontalAlign;
            _VerticalAlign = VerticalAlign;
            _Visible = Visible;
        }

        #region Properties
        /// <summary>
        /// Describe the Border of this Element
        /// </summary>
        public cUIBorderStyle Border
        {
            get { return _Border; }
            set { _Border = value; }
        }

        /// <summary>
        /// Describe Space between this control and her children to the border
        /// </summary>
        public System.Windows.Thickness Padding
        {
            get { return _Padding; }
            set { _Padding = value; }
        }

        /// <summary>
        /// Describe Space between this Element an her Parent - Element
        /// </summary>
        public System.Windows.Thickness Margin
        {
            get { return _Margin; }
            set { _Margin = value; }
        }

        /// <summary>
        /// Define the Color for Elements Background
        /// </summary>
        public System.Windows.Media.Color BackgroundColor
        {
            get { return _BackgroundColor; }
            set { _BackgroundColor = value; }
        }

        /// <summary>
        /// Describe the for the Element used fontname
        /// </summary>
        public string FontFamily
        {
            get { return _FontFamily; }
            set { _FontFamily = value; }
        }

        /// <summary>
        /// Describe the for the Element used font size
        /// </summary>
        public double FontSize
        {
            get { return _FontSize; }
            set { _FontSize = value; }
        }

        public Color FontColor
        {
            get { return _FontColor; }
            set { _FontColor = value; }
        }

        public FontStyle FontStyle
        {
            get { return _FontStyle; }
            set { _FontStyle = value; }
        }

        public FontWeight FontWeight
        {
            get { return _FontWeight; }
            set { _FontWeight = value; }
        }

        public Enums.eXMLHorizontalAlign HorizontalAlign
        {
            get { return _HorizontalAlign; }
            set { _HorizontalAlign = value;}
        }

        public Enums.eXMLVerticalAlign VerticalAlign
        {
            get { return _VerticalAlign; }
            set { _VerticalAlign = value; }
        }

        public double Height
        {
            get { return _Height; }
            set { _Height = value; }
        }

        public double Width
        {
            get { return _Width; }
            set { _Width = value; }
        }

        public Visibility Visible
        {
            get { return _Visible; }
            set { _Visible = value; }
        }

        #endregion
    }
}
